package com.cmc.cloud.cmclink.doc.convert;

import java.util.List;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import com.cmc.cloud.cmclink.doc.entity.DgCommodityPsnDO;
import com.cmc.cloud.cmclink.doc.vo.special.dgcommoditypsnvo.DgCommodityPsnCreateReqVO;
import com.cmc.cloud.cmclink.doc.vo.special.dgcommoditypsnvo.DgCommodityPsnRespVO;
import com.cmc.cloud.cmclink.doc.vo.special.dgcommoditypsnvo.DgCommodityPsnUpdateReqVO;

/**
 * 危险品品名子表库 Convert
 *
 * @author 集运管理员
 */
@Mapper
public interface DgCommodityPsnConvert {

    DgCommodityPsnConvert INSTANCE = Mappers.getMapper(DgCommodityPsnConvert.class);

    /**
     * 属性转换 convert
     *
     * @param bean
     * @return
     */
    DgCommodityPsnDO convert(DgCommodityPsnCreateReqVO bean);

    /**
     * 属性转换 convert
     *
     * @param bean
     * @return
     */
    @Mapping(target = "mainId", ignore = true)
    DgCommodityPsnDO convert(DgCommodityPsnUpdateReqVO bean);

    /**
     * 属性转换 convert
     *
     * @param bean
     * @return
     */
    DgCommodityPsnRespVO convert(DgCommodityPsnDO bean);

    /**
     * 属性转换 convert
     *
     * @param list
     * @return
     */
    List<DgCommodityPsnRespVO> convertList(List<DgCommodityPsnDO> list);

}
